#ifndef __MARS_GRAPHICS_DEPTH_STENCIL_STATE_H__
#define __MARS_GRAPHICS_DEPTH_STENCIL_STATE_H__

#include "MarsObject.h"

using namespace Core;

namespace Graphics
{

class DepthStencilState : public Object
{
public:
									DepthStencilState( const D3D11_DEPTH_STENCIL_DESC& depthStencilDesc );
									~DepthStencilState();

	bool							Create();
	void							Delete();

	ID3D11DepthStencilState*		GetNativeDepthStencilState() const;

private:
	D3D11_DEPTH_STENCIL_DESC		m_depthStencilDesc;
	ID3D11DepthStencilState*		m_pDepthStencilState;
};

inline DepthStencilState::DepthStencilState( const D3D11_DEPTH_STENCIL_DESC& depthStencilDesc )
: m_pDepthStencilState( NULL )
{
	MARS_MEMCPY( &m_depthStencilDesc, &depthStencilDesc, sizeof( D3D11_DEPTH_STENCIL_DESC ) );
}

inline DepthStencilState::~DepthStencilState()
{
	Delete();
}

inline ID3D11DepthStencilState* DepthStencilState::GetNativeDepthStencilState() const
{
	return m_pDepthStencilState;
}

} // end of namespace Graphics

#endif // end of #ifndef __MARS_GRAPHICS_DEPTH_STENCIL_STATE_H__